<?php
/**
 * @Name  : RoleNodeModel.php
 * @Author: yashuai<1762910894@qq.com>
 */

namespace App\Http\Model\Rbac;

use App\Http\Model\BaseModel;

class RoleNodeModel extends BaseModel
{

    protected $primaryKey = 'ID';

    protected $table      = 'admin_role_node';

    public function node()
    {
        return $this->hasOne(NodeModel::class, 'NodeID', 'NodeID')
            ->select(['NodeID', 'NodeType', 'ParentID']);
    }

}
